
function assessAndWriteTimeseries(fs, fh, data, id, SID, Locus, Like, Know ,Level, filename, Accuracy, AccuracyFirst, Excerpts, age, lang, gender, mus,preceding)




%Decimate
data = data(1:fs/25:end,:);


emotions = {'Elsewhere','Angry','Scared','Sad','Calm','Happy','Excited','Centre'};  
dataCat = assessEmotionDataCategorical(data);
for j = 1:length(dataCat)
     fprintf(fh,'%.2f\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%.3f\t%s\t%.3f\t%s\n', (j-1)/25, filename, id, SID, Excerpts, emotions{dataCat(j)+1} , Like{1}, Know{1}, Level{1}, Locus{1},  age, gender, mus,preceding) ;
end
       